package cn.service;

import java.util.List;

import cn.mapper.UserMapper;
import cn.mapper.UserMapperImp;
import cn.pojo.User;

public class UserServiceImp implements UserService {
	private UserMapper userMapper = new UserMapperImp();

	@Override
	public Integer totalCount(String userName) {
		return userMapper.totalCount(userName);
	}

	@Override
	public List<User> getUserLike(String userName, Integer rowNum, int pagecount) {
		return userMapper.getUserLike(userName, rowNum, pagecount);
	}

	@Override
	public User login(User u) {
		return userMapper.login(u);
	}

	@Override
	public Integer[] deleteBatch(String[] id) {
		return userMapper.deleteBatch(id);
	}

	@Override
	public int userRemove(String id) {
		return userMapper.userRemove(id);
	}

	@Override
	public List<User> getUserByid(String[] id) {
		return userMapper.getUserByid(id);
	}

	@Override
	public User getUserByUserCode(String userCode) {
		return userMapper.getUserByUserCode(userCode);
	}

	@Override
	public User getUserByUserName(String userName) {
		// TODO Auto-generated method stub
		return userMapper.getUserByUserName(userName);
	}

	@Override
	public User getUserByPhone(String phone) {
		return userMapper.getUserByPhone(phone);
	}

	@Override
	public User getUsersById(String id) {
		return userMapper.getUsersById(id);
	}

	@Override
	public int addUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.addUser(user);
	}

	@Override
	public int updateUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.updateUser(user);
	}

	@Override
	public int UpdatePassWord(String userName, String passWord, String passWord1) {
		// TODO Auto-generated method stub
		return userMapper.UpdatePassWord(userName, passWord, passWord1);
	}

	@Override
	public User getUserByUP(String userName, String passWord) {
		// TODO Auto-generated method stub
		return userMapper.getUserByUP(userName, passWord);
	}

}
